<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>乐淘-后台管理系统二级分类</title>
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/bootstrap-validator/css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="assets/nprogress/nprogress.css">
    <link rel="stylesheet" href="css/admin.css">
    <link rel="stylesheet" href="css/categorySecond.css">
</head>
<body>
    <aside class="aside_left">
        <div class="brand text-center">
            <a href="index.html">ITCAST</a>
        </div>
        <div class="user">
            <img src="images/default.png" alt="">
            <span>管理员</span>
        </div>
        <div class="menu">
            <ul>
                <li><a href="userManage.html"><span class="glyphicon glyphicon-user"></span> 用户管理</a></li>
                <li>
                    <a class="now" href="javascript:;"><span class="glyphicon glyphicon-list"></span> 分类管理</a>
                    <div class="child">
                        <a href="categoryFirst.html">一级分类</a>
                        <a class="now" href="categorySecond.html">二级分类</a>
                    </div>
                </li>
                <li><a href="productManage.html"><span class="glyphicon glyphicon-tags"></span> 商品管理</a></li>
            </ul>
        </div>
    </aside>
    <section>
        <nav>
                <a class="link_left" href="javascript:;"><span class="glyphicon glyphicon-align-justify"></span></a>
                <a class="link_right" href="javascript:;"><span class="glyphicon glyphicon-log-out"></span></a>
        </nav>
        <div class="container-fluid">
            <ol class="breadcrumb">
                    <li><a href="#">管理系统</a></li>
                    <li><a href="#">分类管理</a></li>
                    <li class="active">二级分类</li>
            </ol>
            <div class="ad_content">
                <span class="btn btn-default add-btn">添加分类</span>
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th>序号</th>
                            <th>一级分类名称</th>
                            <th>二级分类名称</th>
                            <th>二级分类LOGO</th>
                        </tr>
                    </thead>
                    <tbody>
                        
                    </tbody>
                </table>
                <ul id='paginator'></ul>
            </div>
        </div>
    </section>
    <div class="modal fade" id="optionModal">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title text-center">添加分类</h4>
                </div>
                <div class="modal-body">
                    <form action="#" id="form" autocomplete="off">
                        <div class="form-group">
                            <div class="dropdown">
                                一级分类：
                                <button id="dLabel" class="btn" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <span class="choose">请选择</span>
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu" aria-labelledby="dLabel">
                                   
                                </ul>
                            </div>
                            <input type="hidden" name="categoryId">
                        </div>
                        <div class="form-group">
                            <input type="text" name="brandName" class="form-control" placeholder="请输入二级分类名称">
                        </div>
                        <div class="form-group upload">
                            <input type="file" name="pic1" id="fileupload" data-url="/category/addSecondCategoryPic">
                            <input type="hidden" name="brandLogo">
                            <div class="btn btn-default load">上传图片</div>
                        </div>
                        <div class="form-group">
                            <img src="images/none.png" alt="" id="image" width="100">
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary" form="form">确定</button>
                    
                </div>
            </div>
        </div>
    </div>

    <script type="text/template" id="template">
        <% for(var i = 0; i< rows.length;i++){%>
        <tr>
            <td><%=(page-1)*size+1+i%></td>
            <td><%=rows[i].categoryName%></td>
            <td><%=rows[i].brandName%></td>
            <td>
                <img src="<%=rows[i].brandLogo%>" alt="" width="50" height="25.75">
            </td>
        </tr>
        <% }%>
    </script>
    <script type="text/template" id="dropdownmenu">
        <% for(var i = 0; i< rows.length;i++){%>
            <li class="text-center" data-id="<%=rows[i].id%>"><%=rows[i].categoryName%></li>
        <% }%>
    </script>



    <script src="assets/jquery/jquery.min.js"></script>
    <script src="assets/bootstrap/js/bootstrap.min.js"></script>
    <script src="assets/bootstrap-validator/js/bootstrapValidator.min.js"></script>
    <script src="assets/nprogress/nprogress.js"></script>
    <script src="assets/artTemplate/template-native.js"></script>
    <script src="assets/bootstrap-paginator/bootstrap-paginator.min.js"></script>
    <script src="assets/jquery-fileupload/jquery.ui.widget.js"></script>
    <script src="assets/jquery-fileupload/jquery.fileupload.js"></script>
    <script src="js/admin.js"></script>
    <script src="js/categorysecond.js"></script>

</body>
</html>